package com.hainatong.jcmvvmbase;

import android.view.View;
import com.hainatong.jcmvvmbase.databinding.FragmnetLazyloadBinding;

public class NewLazyFragment extends MvvmLazyFragment<FragmnetLazyloadBinding, FirstViewModel>
{

    @Override
    public int getLayoutId()
    {
        return R.layout.fragmnet_lazyload;
    }

    @Override
    protected void lazyLoad()
    {
        viewModel.text.set("点击");


        viewModel.getInfoByNet("NewLazyFragment")
                 .observe(this,result ->{

                     viewModel.text.set( result );

                 });
    }

    @Override
    public int getBindingVariable()
    {
        return 1;
    }

    @Override
    protected void onRetryBtnClick()
    {

    }
}
